package hotel.switchs.oversea.online.service;

import hotel.base.oversea.service.BaseService;
import hotel.base.oversea.utils.Result;
import hotel.base.oversea.vo.CreateRoomResultVo;
import hotel.switchs.oversea.api.VO.*;
import hotel.switchs.oversea.api.VO.request.*;
import hotel.switchs.oversea.api.entity.SwitchBasicRoomType;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author lmf
 * @Date 2020/5/16 16:14
 **/
@Service
@Primary
public interface SwitchBasicRoomTypeService extends BaseService {

    /**
     * 保存母酒店物理房型数据
     * @param dltBasicRoomTypeVosMap
     * @return
     */
    Result<Object> saveRoomTypeInfos(Map<String, List<DltBasicRoomTypeVo>> dltBasicRoomTypeVosMap);

    /**
     * 获取母物理房型列表
     */
    Result<Object> getDltBasicRoomList(int hotelId);
    /**
     * 获取母物理房型列表
     * 并保存到数据库中
     */
    Result<Object> getHotelBasicRoomList(int hotelId);

    /**
     * 获取酒店房型静态信息列表
     */
    Result<Object> getHotelRoomStaticInfo(Map<String, Object> map, int masterHotelID);

    /**
     * 保存静态物理房型数据
     * @return
     */
    Result<Object> saveBasicRoomData(Map<String, List<RoomStaticInfoVo>> roomStaticInfoListMap);

    /**
     * 新增子物理房型
     */
    Result<Object> createBasicRoom(CreateBasicRoomVo createBasicRoomVo);

    /**
     * 更新子物理房型
     */
    Result<Object> updateBasicRoom(UpdateBasicRoomVo updateBasicRoomVo);

    /**
     * 设置售卖房型上下线
     */
    Result<Object> setRoomOnlineOffline(SetRoomOnlineOfflineVo setRoomOnlineOfflineVo);

    /**
     * 更改售卖房型渠道名称
     */
    Result<Object> updateRoomSaleName(Map<String, Object> map);

    /**
     *  设置房型库存房态共享
     */
    Result<Object> setRoomShare(SetRoomShareVo setRoomShareVo);
    /**
     * 创建售卖房型
     * @param createRoomVo
     */
    Result<CreateRoomResultVo> createRoom(CreateRoomVo createRoomVo);
    /**
     * 更新售卖房型
     */
    Result<Object> updateRateCode(UpdateRateCodeVo updateRateCodeVo);
    /**
     * 更新房型售卖规则
     * @param setRoomSaleRuleVo
     */
    Result<Object> setRoomSaleRule(SetRoomSaleRuleVo setRoomSaleRuleVo);
    /**
     * 获取房型售卖规则
     */
    Result<List<RoomSaleRuleReturnVo>> getRoomSaleRule(Map<String, Object> map);

    /**
     * 根据子酒店id+子物理房型id获取携程的母物理房型id+物理房型名称
     * @param hotelId
     * @param basicRoomTypeId
     * @return
     */
    SwitchBasicRoomType selectByBasicId(Integer hotelId, Integer basicRoomTypeId);
    /***
    * @Author: lmf
    * @Date: 2021/4/6
     * 获取物理房型的基本信息
    */
    Result<Map<String,SwitchHotelRoomStaticInfoVo>> getHotelRoomStaticInfoList(Integer hotelId, Integer masterHotelID);
    /**
     *
     * @param hotelID
     * @return
     * 获取母物理房型Id
     */
    Result<Object> getRoomListByHotelId(int hotelId);
    /**
     * 获取酒店的动态取消规则
     * @param map
     * @return
     */
    Result<List<RoomSaleRuleVo>> getSaleRuleDirect(Map<String, Object> map);
}
